package com.atguigu.spzx.manager.controller;

import com.atguigu.spzx.manager.service.OrderStatisticsService;
import com.atguigu.spzx.model.pojo.order.OrderStatistics;
import com.atguigu.spzx.model.vo.common.Result;
import com.atguigu.spzx.model.vo.product.OrderStatisticsVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author dyl
 * @version 1.0
 * @description:
 * @date 2025/1/14 21:00
 */
@RestController
@RequestMapping("/admin/order/orderStatistics")
@Tag(name = "订单统计")
@CrossOrigin(allowCredentials = "true", originPatterns = "*", allowedHeaders = "*")
public class OrderStatisticsController {
    @Autowired
    private OrderStatisticsService orderStatisticsService;

    @GetMapping("/getStatisticsInfo")
    @Operation(summary = "获取统计信息")
    public Result<OrderStatisticsVo> getStatisticsInfo() {
        return Result.ok(orderStatisticsService.getStatisticsInfo());
    }

}
